﻿using System.Windows;

namespace HuaWeiCamera
{
    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class App : Application
    {
        public static NLog.Logger NewNLog;
        private void App_OnExit(object sender, ExitEventArgs e)
        {
            
        }

        private void App_OnStartup(object sender, StartupEventArgs e)
        {
            DispatcherUnhandledException += App_DispatcherUnhandledException;
            NewNLog = NLog.LogManager.GetLogger("HuaWeiCameraLoger");
        }
        private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
        {
            NewNLog.Error($"捕获到异常：{e}");
        }
    }
}
